package com.atguigu.yygh.statistics.controller;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.order.client.OrderInfoFeignClient;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/admin/statistics")
public class StatisticsController {

    @Autowired
   private OrderInfoFeignClient orderInfoFeignClient;


    @GetMapping("/countOrderInfo")
    public R countOrderInfo(OrderCountQueryVo orderCountQueryVo){
        Map<String, Object> stringObjectMap = orderInfoFeignClient.countOrderInfo(orderCountQueryVo);
        return R.ok().data(stringObjectMap);
    }
}